<?php
namespace Boke\Controller;
use Think\Controller;
class FbController extends Controller {
    public function announce(){
        $this->display();
    }
    public function fb_ext(){
    
		$cate=D('wenzhang');
		
		$act_id['id']=array('eq',I('id'));
        $wenzhang=$cate->where($act_id)->select();
        $this->assign('wenzhang',$wenzhang);
    	$this->display();
    }

    public function upimg(){
    	 $upload = new \Think\Upload();// 实例化上传类
   			$upload->maxSize   =     0 ;// 设置附件上传大小
    	    $upload->exts      =     array('jpg', 'gif', 'png', 'jpeg','mp4','rmvb');// 设置附件上传类型
   		    $upload->rootPath  =     './Upload'; // 设置附件上传根目录
   		    $upload->savePath  =     '/img'; // 设置附件上传（子）目录
    		// 上传文件 
    		$info   =   $upload->upload(); 
   			 if(!$info) {// 上传错误提示错误信息
      			  $this->error($upload->getError());
  			  }else{// 上传成功
  			 	 foreach($info as $file){
  			 	    $po_i='http://192.168.1.102/Upload/';
  			 	 	$dokj["img"]=$po_i.=$file['savepath'].$file['savename'];
  			 	 	 $this->ajaxReturn($dokj);
        			
   				 }
     		
   			  
   			 }
    }
	
}